<script setup name="Index" lang="ts" >
import PublicComponent from '@/components/publicComponent/PublicComponent.vue';
type A={
    name:string,
    age:number
}
const a=ref<A>()

onBeforeMount(()=>{

    console.log(a.value?.age)
    a.value={
        name:"jhj",
        age:1
    }

})
</script>

<template>
    <div class="Index">
        <div class="publicComponent">
        <PublicComponent/>
    </div>
    <ElButton>{{ 
        a?.age
    }}</ElButton>
    </div>
</template>


<style scoped lang="scss">
.Index{
    width: 750px;
    height: 100vh;
    background-color: red;
}
</style>